<?php


namespace App\Http\Controllers\CmsApi;

use App\Http\Controllers\BaseController;
use App\Http\Model\Hint;
use App\Http\Model\OutJson;
use App\Http\Services\KovServices;
use App\Lib\Response;
use Illuminate\Http\Request;

class KovController extends BaseController
{
    protected $kovService;

    public function __construct()
    {
        $this->kovService = new KovServices();
    }

    /**
     * excel查询入库
     */
    public function create(Request $request)
    {
        $request = $request->all();
        $userids = $request['userids'];
        //数据处理
        $status = $this->kovService->checkAndInsert($userids);
        if ($status) {
            Response::returnResult(Hint::SUCCESS, $status);
        } else {
            Response::returnResult(Hint::ERR_DB_FAIL, $status);
        }
    }
}